import { createRouter, createWebHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "home",
      component: HomeView,
      meta: {
        tabbarShow: true,
      },
    },
    {
      path: "/my",
      name: "my",
      component: () => import("../views/MyView.vue"),
      meta: {
        tabbarShow: true,
      },
    },
    {
      path: "/cart",
      name: "cart",
      component: () => import("../views/CartView.vue"),
      meta: {
        tabbarShow: true,
      },
    },
    {
      path: "/cate",
      name: "cate",
      component: () => import("../views/CateView.vue"),
      meta: {
        tabbarShow: true,
      },
    },
    {
      path: "/detail",
      name: "detail",
      component: () => import("../views/DetailView.vue"),
    },
    {
      path: "/search",
      name: "search",
      component: () => import("../views/SearchResultView.vue"),
    },
    {
      path: "/login",
      name: "login",
      component: () => import("../views/LoginView.vue"),
    },
    {
      path: "/reg",
      name: "reg",
      component: () => import("../views/RegView.vue"),
    },
  ],
});

export default router;
